﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Yachttransportlines
{
    public partial class Contact : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void dfsSubmit_Click(object sender, EventArgs e)
        {
            bp.BusinessLogic.Mail mail = new bp.BusinessLogic.Mail();
            //Confirmation page that will be sent to the user
            string msg = mail.SendMail(Server.MapPath("ContactConfirmation.html"), "mail.bpwe.net", "contact@yachttransportlines.com", dfsEmail.Text,
                                      "root@bpwe.net", "Nv4c7df7", "Thank You For Contacting Yacht Transport Lines", dfsName.Text, "",
                                      "", Guid.NewGuid(), "", "", "");



            //notification page
            mail.SendMail(Server.MapPath("ContactNotification.html"), "mail.bpwe.net", dfsEmail.Text, "contact@yachttransportlines.com",
            "root@bpwe.net", "Nv4c7df7", "Contact Notification", "Yacht Transport Lines", "",


           dfsName.Text + "<br/>" + "Phone Number:" + dfsPhone.Text + "<br/>" + "Email Address" + dfsEmail.Text + "Message" + dfsComments.Text, Guid.NewGuid(), "", "", "");

            Response.Redirect("Thank-You.aspx");

        }
    }
}